// 删除a标签上的tr，传入this，servlet字符串，路径path
function deleteTr(node, servlet, path) {
	var trNode = node.parentNode.parentNode;
	var id = trNode.childNodes[1].innerHTML;
	var msg = "您确定要删除编号为 " + id + " 的信息吗？";
	if (confirm(msg) == false)
		return false;
	var operationUrl = window.location.protocol + '//' + window.location.host
			+ path + '/' + servlet;

	$.ajax({
		type : 'post',
		url : operationUrl,
		data : {
			'operation' : 'del',
			'id' : id
		},
		success : function() {
			trNode.parentNode.removeChild(trNode);
			alert('删除 ' + id + ' 成功！');
		},
		timeout : 5000,
		error : function() {
			alert('删除 ' + id + ' 失败！');
		}
	});
};

function trbg(){
	// 隔行显示，鼠标停留显示整行
	$('tbody>tr:not(#search)').each(function(){
			this.onmouseover = function() {
				this.style.backgroundColor = '#E0FFFF';
			};
	});
	$('tbody>tr:odd:not(#search)').each(function(){
		this.onmouseout = function() {
			this.style.backgroundColor = '#fff';
		};
	});
	$('tbody>tr:even:not(#search)').each(function(){
		this.onmouseout = function() {
			this.style.backgroundColor = '#edf5ff';
		};
		this.style.backgroundColor = '#edf5ff';
	});
}
